<%if !@json_results.nil? %>
var recs = <%= @json_results %>;

document.write('<div class="oer_recommender_container">');
document.write('<div class="oer_recommender_list">');
for(nRec = 0; nRec < recs.length; nRec++) {
	r = recs[nRec];
	document.write('<p class="oer_recommender_item"><a class="oer_recommender_hit_link" href="' + (r.direct_link == null ? r.permalink : r.direct_link) + '">' + r.title + ' (' + r.collection + ')</a></p>');
	document.write('<p class="oer_recommender_item_description">' + (r.description.length > 200 ? r.description.substring(0,200) + '...' : r.description) + '</a></p>');
}
document.write('</div>');	
document.write('</div>');	
<% end %>